public class 方法参数传递 {
    public static void main(String[] args) {
        int number = 100;
        int [] arr ={10,20,30,40};
        System.out.println("调用change方法前：" + number);
        change (number);
        System.out.println("调用change方法后 ：" + number);
        System.out.println("调用change方法前：" + arr[1]);
        change(arr);
        System.out.println("调用change方法后：" + arr[1]);
    }
    //形参 number不影响实参number,在main方法是实参进行输出
    public static void change(int number){
        number = 200;
    }public static void change(int[] arr){
        arr [1] = 200;
    }
}

